USE [DBCursoDotNetDEV]
GO

/****** Object:  Table [dbo].[TBCalendario]    Script Date: 08/13/2012 13:03:12 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TBCalendario](
	[IDCalendario] [int] IDENTITY(1,1) NOT NULL,
	[IDCurso] [int] NOT NULL,
 CONSTRAINT [PK_TBCalendario] PRIMARY KEY CLUSTERED 
(
	[IDCalendario] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[TBCalendario]  WITH CHECK ADD  CONSTRAINT [FK_TBCalendario_TBCurso] FOREIGN KEY([IDCurso])
REFERENCES [dbo].[TBCurso] ([IDCurso])
GO

ALTER TABLE [dbo].[TBCalendario] CHECK CONSTRAINT [FK_TBCalendario_TBCurso]
GO


GO

GO

/****** Object:  Table [dbo].[TBCalendarioDia]    Script Date: 08/13/2012 13:17:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[TBCalendarioDia](
	[IDCalendarioDia] [int] IDENTITY(1,1) NOT NULL,
	[IDCalendario] [int] NOT NULL,
	[DTAula] [date] NOT NULL,
	[Previsto] [varchar](200) NOT NULL,
	[Realizado] [varchar](200) NULL,
	[STConcluido] [bit] NOT NULL,
	[NRAula] [int] NOT NULL,
 CONSTRAINT [PK_TBCalendarioDia] PRIMARY KEY CLUSTERED 
(
	[IDCalendarioDia] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[TBCalendarioDia]  WITH CHECK ADD  CONSTRAINT [FK_TBCalendarioDia_TBCalendario] FOREIGN KEY([IDCalendario])
REFERENCES [dbo].[TBCalendario] ([IDCalendario])
GO

ALTER TABLE [dbo].[TBCalendarioDia] CHECK CONSTRAINT [FK_TBCalendarioDia_TBCalendario]
GO


